package com.yuwen.yuwenRPC.fault.tolerant;

/**
 * @ClassNameFastFailTolerantStrategy
 * @Description TODO
 * @Author钰玟
 * @Date2025/4/6 下午1:49
 * @Version 1.0
 **/


import com.yuwen.yuwenRPC.model.RpcResponse;

import java.util.Map;

/**
 * 快速失败容错
 */
public class FailFastTolerantStrategy implements  TolerantStrategy{


    /**
     * 容错
     * @param context 上下文，传递数据
     * @param e 异常类型
     * @return rpcResponse
     */
    @Override
    public RpcResponse doTolerant(Map<String, Object> context, Exception e) {
        throw new RuntimeException("服务报错",e);
    }
}
